package com.wwe.kotlinstudy.util.extend.three

open class Snake {

    var name: String

    var length: Int

    init {
        name = "眼镜蛇"
    }

    constructor(length: Int) {
        this.length = length
    }

    constructor(type: String,size: Int) {
        this.name = type
        this.length = size
    }

    /**加了open说明该函数可以被子类重写*/
    open fun skill() {
        println("我是蛇神，众蛇必须向我朝拜")
    }


}